DROP TABLE CRST_HZ_CUST_ACCOUNTS;

CREATE TABLE CRST_HZ_CUST_ACCOUNTS
(
  CUST_ACCOUNT_ID                 NUMBER(15)    NOT NULL,
  PARTY_ID                        NUMBER(15)    NOT NULL,
  LAST_UPDATE_DATE                DATE          NOT NULL,
  ACCOUNT_NUMBER                  VARCHAR2(30 BYTE) NOT NULL,
  LAST_UPDATED_BY                 NUMBER(15)    NOT NULL,
  CREATION_DATE                   DATE          NOT NULL,
  CREATED_BY                      NUMBER(15)    NOT NULL,
  LAST_UPDATE_LOGIN               NUMBER(15),
  REQUEST_ID                      NUMBER(15),
  PROGRAM_APPLICATION_ID          NUMBER(15),
  PROGRAM_ID                      NUMBER(15),
  PROGRAM_UPDATE_DATE             DATE,
  WH_UPDATE_DATE                  DATE,
  ATTRIBUTE_CATEGORY              VARCHAR2(30 BYTE),
  ATTRIBUTE1                      VARCHAR2(150 BYTE),
  ATTRIBUTE2                      VARCHAR2(150 BYTE),
  ATTRIBUTE3                      VARCHAR2(150 BYTE),
  ATTRIBUTE4                      VARCHAR2(150 BYTE),
  ATTRIBUTE5                      VARCHAR2(150 BYTE),
  ATTRIBUTE6                      VARCHAR2(150 BYTE),
  ATTRIBUTE7                      VARCHAR2(150 BYTE),
  ATTRIBUTE8                      VARCHAR2(150 BYTE),
  ATTRIBUTE9                      VARCHAR2(150 BYTE),
  ATTRIBUTE10                     VARCHAR2(150 BYTE),
  ATTRIBUTE11                     VARCHAR2(150 BYTE),
  ATTRIBUTE12                     VARCHAR2(150 BYTE),
  ATTRIBUTE13                     VARCHAR2(150 BYTE),
  ATTRIBUTE14                     VARCHAR2(150 BYTE),
  ATTRIBUTE15                     VARCHAR2(150 BYTE),
  ATTRIBUTE16                     VARCHAR2(150 BYTE),
  ATTRIBUTE17                     VARCHAR2(150 BYTE),
  ATTRIBUTE18                     VARCHAR2(150 BYTE),
  ATTRIBUTE19                     VARCHAR2(150 BYTE),
  ATTRIBUTE20                     VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE_CATEGORY       VARCHAR2(30 BYTE),
  GLOBAL_ATTRIBUTE1               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE2               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE3               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE4               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE5               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE6               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE7               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE8               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE9               VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE10              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE11              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE12              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE13              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE14              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE15              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE16              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE17              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE18              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE19              VARCHAR2(150 BYTE),
  GLOBAL_ATTRIBUTE20              VARCHAR2(150 BYTE),
  ORIG_SYSTEM_REFERENCE           VARCHAR2(240 BYTE) NOT NULL,
  STATUS                          VARCHAR2(1 BYTE) NOT NULL,
  CUSTOMER_TYPE                   VARCHAR2(30 BYTE),
  CUSTOMER_CLASS_CODE             VARCHAR2(30 BYTE),
  PRIMARY_SALESREP_ID             NUMBER(15),
  SALES_CHANNEL_CODE              VARCHAR2(30 BYTE),
  ORDER_TYPE_ID                   NUMBER(15),
  PRICE_LIST_ID                   NUMBER(15),
  SUBCATEGORY_CODE                VARCHAR2(30 BYTE),
  TAX_CODE                        VARCHAR2(50 BYTE),
  FOB_POINT                       VARCHAR2(30 BYTE),
  FREIGHT_TERM                    VARCHAR2(30 BYTE),
  SHIP_PARTIAL                    VARCHAR2(1 BYTE),
  SHIP_VIA                        VARCHAR2(30 BYTE),
  WAREHOUSE_ID                    NUMBER(15),
  PAYMENT_TERM_ID                 NUMBER(15),
  TAX_HEADER_LEVEL_FLAG           VARCHAR2(1 BYTE),
  TAX_ROUNDING_RULE               VARCHAR2(30 BYTE),
  COTERMINATE_DAY_MONTH           VARCHAR2(6 BYTE),
  PRIMARY_SPECIALIST_ID           NUMBER(15),
  SECONDARY_SPECIALIST_ID         NUMBER(15),
  ACCOUNT_LIABLE_FLAG             VARCHAR2(1 BYTE),
  RESTRICTION_LIMIT_AMOUNT        NUMBER,
  CURRENT_BALANCE                 NUMBER,
  PASSWORD_TEXT                   VARCHAR2(60 BYTE),
  HIGH_PRIORITY_INDICATOR         VARCHAR2(1 BYTE),
  ACCOUNT_ESTABLISHED_DATE        DATE,
  ACCOUNT_TERMINATION_DATE        DATE,
  ACCOUNT_ACTIVATION_DATE         DATE,
  CREDIT_CLASSIFICATION_CODE      VARCHAR2(30 BYTE),
  DEPARTMENT                      VARCHAR2(30 BYTE),
  MAJOR_ACCOUNT_NUMBER            VARCHAR2(30 BYTE),
  HOTWATCH_SERVICE_FLAG           VARCHAR2(1 BYTE),
  HOTWATCH_SVC_BAL_IND            VARCHAR2(30 BYTE),
  HELD_BILL_EXPIRATION_DATE       DATE,
  HOLD_BILL_FLAG                  VARCHAR2(1 BYTE),
  HIGH_PRIORITY_REMARKS           VARCHAR2(80 BYTE),
  PO_EFFECTIVE_DATE               DATE,
  PO_EXPIRATION_DATE              DATE,
  REALTIME_RATE_FLAG              VARCHAR2(1 BYTE),
  SINGLE_USER_FLAG                VARCHAR2(1 BYTE),
  WATCH_ACCOUNT_FLAG              VARCHAR2(1 BYTE),
  WATCH_BALANCE_INDICATOR         VARCHAR2(1 BYTE),
  GEO_CODE                        VARCHAR2(30 BYTE),
  ACCT_LIFE_CYCLE_STATUS          VARCHAR2(30 BYTE),
  ACCOUNT_NAME                    VARCHAR2(240 BYTE),
  DEPOSIT_REFUND_METHOD           VARCHAR2(20 BYTE),
  DORMANT_ACCOUNT_FLAG            VARCHAR2(1 BYTE),
  NPA_NUMBER                      VARCHAR2(60 BYTE),
  PIN_NUMBER                      NUMBER(16),
  SUSPENSION_DATE                 DATE,
  WRITE_OFF_ADJUSTMENT_AMOUNT     NUMBER,
  WRITE_OFF_PAYMENT_AMOUNT        NUMBER,
  WRITE_OFF_AMOUNT                NUMBER,
  SOURCE_CODE                     VARCHAR2(150 BYTE),
  COMPETITOR_TYPE                 VARCHAR2(150 BYTE),
  COMMENTS                        VARCHAR2(240 BYTE),
  DATES_NEGATIVE_TOLERANCE        NUMBER,
  DATES_POSITIVE_TOLERANCE        NUMBER,
  DATE_TYPE_PREFERENCE            VARCHAR2(20 BYTE),
  OVER_SHIPMENT_TOLERANCE         NUMBER,
  UNDER_SHIPMENT_TOLERANCE        NUMBER,
  OVER_RETURN_TOLERANCE           NUMBER,
  UNDER_RETURN_TOLERANCE          NUMBER,
  ITEM_CROSS_REF_PREF             VARCHAR2(30 BYTE),
  SHIP_SETS_INCLUDE_LINES_FLAG    VARCHAR2(1 BYTE),
  ARRIVALSETS_INCLUDE_LINES_FLAG  VARCHAR2(1 BYTE),
  SCHED_DATE_PUSH_FLAG            VARCHAR2(1 BYTE),
  INVOICE_QUANTITY_RULE           VARCHAR2(30 BYTE),
  PRICING_EVENT                   VARCHAR2(30 BYTE),
  ACCOUNT_REPLICATION_KEY         NUMBER(15),
  STATUS_UPDATE_DATE              DATE,
  AUTOPAY_FLAG                    VARCHAR2(1 BYTE),
  NOTIFY_FLAG                     VARCHAR2(1 BYTE),
  LAST_BATCH_ID                   NUMBER,
  ORG_ID                          NUMBER(15),
  OBJECT_VERSION_NUMBER           NUMBER,
  CREATED_BY_MODULE               VARCHAR2(150 BYTE),
  APPLICATION_ID                  NUMBER,
  SELLING_PARTY_ID                NUMBER(15),
  CUST_ACCOUNT_ID_N               NUMBER(15),
  ACCOUNT_NUMBER_N                VARCHAR2(30 BYTE),
  ORIG_SYSTEM_REFERENCE_N         VARCHAR2(240 BYTE)
);
